package com.xxxx.server.controller;

import com.xxxx.server.pojo.RespPageBean;
import com.xxxx.server.service.impl.ErrorRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @description: 错误记录
 * @author: Honors
 * @create: 2021-11-11
 */
@RestController
@RequestMapping("/errorRecord")
@Api(value = "错误记录", tags = "错误记录")
public class ErrorRecordController {

    @Resource
    private ErrorRecordService errorRecordService;

    @ApiOperation("错误记录分页")
    @GetMapping("/page")
    public RespPageBean fileUpload(
            @ApiParam @RequestParam(defaultValue = "1") Integer currentPage,
            @ApiParam @RequestParam(defaultValue = "10") Integer size,
            @ApiParam @RequestParam String type) {
        return errorRecordService.getPage(currentPage, size, type);
    }

}
